<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%-- 
    Document   : removeMatch
    Created on : 29.4.2011, 14:06:08
    Author     : Football-Statistics Team
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<f:setLocale value="${pageContext.request.locale}"/>
<f:setBundle basename="labelsBundle" />

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><f:message key="project_title" /></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="../css/admin.css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="../js/adminmenu.js"></script>
    </head>
    <body>
        <%@include file="adminmenu.jsp" %>  
        <h2><f:message key="remove_match"/></h2>
        <c:import url="XSLT/leagueSelect.xsl" var="xslt"/>
        <f:message key="select_season" var="select_season"/>
        <c:if test="${not empty xml_leagues}">
            <div class="box">
                <label><f:message key="select_season"/>: </label>
            <x:transform xml="${xml_leagues}" xslt="${xslt}">
                <x:param name="select_season" value="${select_season}"/>
                <x:param name="lid" value="${lid}"/>
                <x:param name="redirect" value="${pageContext.request.contextPath}/administration?section=matches&lid="/>
            </x:transform>
            </div>    
            <ul id="nav">
                <li><a href="${pageContext.request.contextPath}/administration/add-match?lid=${lid}" target="_self"><f:message key="add_match" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/remove-match?lid=${lid}" target="_self"><f:message key="remove_match" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/edit-match?lid=${lid}" target="_self"><f:message key="edit_match" /></a></li>
            </ul>        
        </c:if>
        <c:if test="${not empty error}">
            <div class="error">
                <c:out value="${error}"/>
            </div>
        </c:if>
        <c:if test="${not empty success}">
            <div class="success">
                <c:out value="${success}"/>
            </div>
        </c:if>
        <c:if test="${not empty xml_matches}">
            <c:import url="XSLT/matchSelect.xsl" var="xslt"/>
            <f:message key="select_match" var="select_match"/>
            <div class="box">
                <label><f:message key="select_match"/>: </label>
                <x:transform xml="${xml_matches}" xslt="${xslt}">
                    <x:param name="select_match" value="${select_match}"/>
                    <x:param name="mid" value="${mid}"/>
                    <x:param name="redirect" value="${pageContext.request.contextPath}/administration/remove-match?lid=${lid}&mid="/>
                </x:transform>
            </div>
            <c:if test="${not empty mid}">
                <form action="${pageContext.request.contextPath}/administration/remove-match" method="post">
                    <f:message key="remove_match" var="remove"/>
                    <input type="hidden" name="lid" value="${lid}"/>
                    <input type="hidden" name="mid" value="${mid}"/>
                    <input id="button" type="submit" value="${remove}"/>
                </form>
            </c:if>
        </c:if>
    </body>
</html>
